<?php
/**
 * Created by PhpStorm.
 * User: changyifan
 * Date: 2018/3/26
 * Time: 下午4:30
 */

namespace Home\Dao;
use Think\Model\BaseDao;

class NaturalclassDao extends BaseDao{
    protected $_map = array(
        'sd_boss_add'       => 'sch_id',
        'de_boss_add'       => 'dept_id',
        'noun_boss_add'     => 'pro_id',
        'add_cla_name'      => 'cla_name',
        'add_stu_grade'     => 'stu_gra',
        'add_cla_number'    => 'cla_number',
        'add_cla_intro'     => 'cla_intro',
        'sd_boss_edit'       => 'sch_id',
        'de_boss_edit'       => 'dept_id',
        'noun_boss_edit'     => 'pro_id',
        'edit_cla_id'        => 'cla_id',
        'edit_cla_name'      => 'cla_name',
        'edit_stu_grade'     => 'stu_gra',
        'edit_cla_number'    => 'cla_number',
        'edit_cla_intro'     => 'cla_intro',
        'delete_cla_id'        => 'cla_id',
    );
    protected $_validate = array(
        array('sch_id','0','请选择所属学院',0,'notequal'),
        array('dept_id','0','请选择所属系部',0,'notequal'),
        array('pro_id','0','请选择所属专业',0,'notequal'),
        array('cla_id','require','班级编号不能为空'),
        array('cla_name','require','班级名称不能为空'),
        array('stu_gra','require','所在年级不能为空'),
        array('cla_number','require','班级不能为空'),
        array('cla_intro','require','班级简介不能为空'),
    );


}